package com.mao.Interface;

public class Test {
    public static void main(String[] args) {
        // 定义10个学生信息，存在在allStudents数组中
        Student[] allStudents = new Student[10];
        allStudents[0] = new Student("Mary", '女', 100);
        allStudents[1] = new Student("Jame", '男', 90);
        allStudents[2] = new Student("Tom", '男', 80);
        allStudents[3] = new Student("Jim", '男', 70);
        allStudents[4] = new Student("Jane", '女', 60);
        allStudents[5] = new Student("Hardon", '男', 100);
        allStudents[6] = new Student("Jimmy", '男', 90);
        allStudents[7] = new Student("Loopy", '女', 88);
        allStudents[8] = new Student("Harry", '男', 100);
        allStudents[9] = new Student("Bean", '男', 90);

        ClassDataInter cdi = new ClassDataInterImpl1(allStudents);
        cdi.printAllStudentInfos();
        cdi.printAverageScore();
        System.out.println("==============================");
        ClassDataInter cdi2 = new ClassDataInterImpl2(allStudents);
        cdi2.printAllStudentInfos();
        cdi2.printAverageScore();
    }
}
